tic;
% Objective
% f=[-3,-5,-3];
f=zeros(3,1);
f([1,3],1)=-3;
f(2)=-5;

% Equality Constraints
% A=[1,-1,1;2,3,6];
% b=[15;30];
A=zeros(2,3);
A(1,[1,3])=1;   A(1,2)=-1;      b(1)=15;
A(2,1)=2;       A(2,2)=3;       A(2,3)=6;   b(2)=30;

% Equality Constraints
% Aeq=[2,1,0];
% beq=[30];
Aeq=zeros(1,3);
Aeq(1,[1,2,3])=[2,1,0]

beq=zeros(1,1);
beq=[30];

% lower bound
lb=zeros(3,1);

% upper bound
% ub=[15;10;5];      
ub(1)=15;
ub(2)=10;
ub(3)=5;
toc;

% solver
tic;
[x,fval,exitflag]=linprog(f,A,b,Aeq,beq,lb,ub)
% [x,fval,exitflag,output, lambda]=linprog(f,A,b,Aeq,beq,lb,ub)
toc;
